app.controller('GetUnitInfoCtrl',function ($scope,$http,$location,$window,$state,$localStorage) {
	$scope.namedata = $localStorage.cur_user.uname;
	$http.post(
        $scope.app.backendurl+"tbl-room/view-one",
        {
           
            'room_id': $state.params.unitid,                             
            'token':$localStorage.token                   

        }
    ).success(function (data) {
     //console.log(data);
      if(data.code==0&&data.msg=="读取成功"){
        $scope.aaData = data.data.model[0];     

      }
      if(data.code==1){
      	alert(data.msg)
      }
       if(data.code==20001){
         $location.path('access.signin');
       }
    }).error(function (data) {
        alert(data);
    })



	
})
